package com.mes.cloud.dto;

import com.mes.cloud.annotation.ExcelAttribute;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 菜单MenuDTO
 *
 * @author wxm
 * @Time 2019-4-16
 */
@ApiModel(value = "MenuDTO", description = "菜单信息")
@Data
public class MenuDTO extends BaseDto implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @ApiModelProperty(value = "ID", dataType = "Long")
    @ExcelAttribute(name = "ID", column = "A")
    private Long id;

    /**
     * 名称
     */
    @ApiModelProperty(value = "名称", dataType = "String")
    @ExcelAttribute(name = "名称", column = "B")
    @NotNull(message = "name不能为空！")
    private String name;

    /**
     * 编码
     */
    @ApiModelProperty(value = "编码", dataType = "String")
    @ExcelAttribute(name = "编码", column = "C")
    @NotNull(message = "code不能为空！")
    private String code;

    /**
     * 菜单类型
     */
    @ApiModelProperty(value = "菜单类型", dataType = "String")
    @ExcelAttribute(name = "菜单类型", column = "D")
    @NotNull(message = "type不能为空！")
    private String type;

    /**
     * 图标
     */
    @ApiModelProperty(value = "经度", dataType = "String")
    @ExcelAttribute(name = "经度", column = "E")
    private String iconskip;

    /**
     * 序号
     */
    @ApiModelProperty(value = "序号", dataType = "Long")
    @ExcelAttribute(name = "序号", column = "F")
    @NotNull(message = "sort不能为空！")
    private Long sort;

    /**
     * 父节点
     */
    @ApiModelProperty(value = "父节点", dataType = "Long")
    @ExcelAttribute(name = "父节点", column = "G")
    @NotNull(message = "parentId不能为空！")
    private Long parentId;

    /**
     * 是否展开
     */
    @ApiModelProperty(value = "是否展开", dataType = "Long")
    @ExcelAttribute(name = "是否展开", column = "H")
    private Long open;

    /**
     * 菜单地址
     */
    @ApiModelProperty(value = "菜单地址", dataType = "String")
    @ExcelAttribute(name = "菜单地址", column = "I")
    private String url;

    /**
     *
     */
    @ApiModelProperty(value = "创建时间", dataType = "Date")
    @ExcelAttribute(name = "创建时间", column = "J")
    private Date crtdate;

    /**
     *
     */
    @ApiModelProperty(value = "修改时间", dataType = "Date")
    @ExcelAttribute(name = "修改时间", column = "K")
    private Date upddate;

    /**
     * 描述
     */
    @ApiModelProperty(value = "备注", dataType = "String")
    private String remark;

    /**
     *
     */
    @ApiModelProperty(value = "是否正常：0:正常 1：删除", dataType = "Integer")
    private Integer isDelete;

    /**
     *
     */
    @ApiModelProperty(value = "是否启用：0正常/1禁用", dataType = "Integer")
    @ExcelAttribute(name = "0正常/1禁用", column = "M")
    private Integer isEnable;

    /**
     * 平台
     */
    @ApiModelProperty(value = "ID", dataType = "String")
    @ExcelAttribute(name = "平台", column = "N")
    @NotNull(message = "platform不能为空！")
    private String platform;

    @ApiModelProperty(value = "英文名称", dataType = "String")
    private String englishName;

    @ApiModelProperty(value = "描述", dataType = "String")
    @ExcelAttribute(name = "描述", column = "L")
    private String describes;

    private List<MenuDTO> children = new ArrayList<MenuDTO>();
}
